/*
 * create on 2008-8-27
 * Copy right (2008)
 * HNA System All rights reserved
 *
 */
package com.myway.dto.order.domain;

import java.util.HashMap;

/**
 * @author Xiaom
 * @project Mars
 * 2008-8-27
 */
public enum TourismRequestStatus {
	
	/**
	 * 申请已通过
	 */
	CNFM("CNFM"),
	
	/**
	 * 申请中

	 */
	RQST("RQST"),
	
	/**
	 * 已取消

	 */
	CNCL("CNCL");
	
	/**
	 * Alias name. This is the name which will be stored in database.
	 */
	private final String alias;
	
	private static HashMap<String,TourismRequestStatus> map;
	
	/**
	 * Construct the hash map at load time
	 */
	static 
	{
		map = new HashMap<String, TourismRequestStatus>();
		for (TourismRequestStatus type : TourismRequestStatus.values()) {
			map.put(type.alias, type);
		}
	}
	
	TourismRequestStatus(String alias){
		this.alias = alias;
	}
	
	public String toString()
	{
		return this.alias;

	}
	
	public static TourismRequestStatus valueOfAlias(String alias) 
	{
		TourismRequestStatus type = map.get(alias);

		if (type == null) {
			throw new IllegalArgumentException("Unknown action alias [" + alias + "]");
		}

		return type;
	}

	/**
	 * @return the alias
	 */
	public String getAlias() {
		return this.alias;
	}
}
